namespace HeThongThongTin.Library.RP.DanhMuc
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;

    /// <summary>
    /// Summary description for CaNhanReport.
    /// </summary>
    public partial class CaNhanReport : Telerik.Reporting.Report
    {
        public CaNhanReport()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        private void CaNhanReport_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;

            this.hoTenCaptionTextBox.Visible = (bool)report.Parameters["HoTenParameter"].Value;
            this.hoTenDataTextBox.Visible = (bool)report.Parameters["HoTenParameter"].Value;

            this.ngaySinhCaptionTextBox.Visible = (bool)report.Parameters["NgaySinhParameter"].Value;
            this.ngaySinhDataTextBox.Visible = (bool)report.Parameters["NgaySinhParameter"].Value;

            this.gioiTinhCaptionTextBox.Visible = (bool)report.Parameters["GioiTinhParameter"].Value;
            this.gioiTinhDataTextBox.Visible = (bool)report.Parameters["GioiTinhParameter"].Value;

            this.danTocCaptionTextBox.Visible = (bool)report.Parameters["DanTocParameter"].Value;
            this.danTocDataTextBox.Visible = (bool)report.Parameters["DanTocParameter"].Value;

            this.quocTichCaptionTextBox.Visible = (bool)report.Parameters["QuocTichParameter"].Value;
            this.quocTichDataTextBox.Visible = (bool)report.Parameters["QuocTichParameter"].Value;

            this.hoChieuCMNDCaptionTextBox.Visible = (bool)report.Parameters["HoChieuCMNDParameter"].Value;
            this.hoChieuCMNDDataTextBox.Visible = (bool)report.Parameters["HoChieuCMNDParameter"].Value;

            this.noiThuongTruCaptionTextBox.Visible = (bool)report.Parameters["NoiThuongTruParameter"].Value;
            this.noiThuongTruDataTextBox.Visible = (bool)report.Parameters["NoiThuongTruParameter"].Value;

            this.choOHienTaiCaptionTextBox.Visible = (bool)report.Parameters["ChoOHienTaiParameter"].Value;
            this.choOHienTaiDataTextBox.Visible = (bool)report.Parameters["ChoOHienTaiParameter"].Value;

            this.trinhDoCaptionTextBox.Visible = (bool)report.Parameters["TrinhDoParameter"].Value;
            this.trinhDoDataTextBox.Visible = (bool)report.Parameters["TrinhDoParameter"].Value;

            this.chucDanhCaptionTextBox.Visible = (bool)report.Parameters["ChucDanhParameter"].Value;
            this.chucDanhDataTextBox.Visible = (bool)report.Parameters["ChucDanhParameter"].Value;

            this.donViCaptionTextBox.Visible = (bool)report.Parameters["DonViParameter"].Value;
            this.donViDataTextBox.Visible = (bool)report.Parameters["DonViParameter"].Value;

            this.ngheNghiepCaptionTextBox.Visible = (bool)report.Parameters["NgheNghiepParameter"].Value;
            this.ngheNghiepDataTextBox.Visible = (bool)report.Parameters["NgheNghiepParameter"].Value;

            this.dienThoaiCaptionTextBox.Visible = (bool)report.Parameters["DienThoaiParameter"].Value;
            this.dienThoaiDataTextBox.Visible = (bool)report.Parameters["DienThoaiParameter"].Value;

            this.emailCaptionTextBox.Visible = (bool)report.Parameters["EmailParameter"].Value;
            this.emailDataTextBox.Visible = (bool)report.Parameters["EmailParameter"].Value;
           
            report.DataSource = this.CaNhanDataSource;
        }
    }
}